﻿using System;
using System.Collections.Generic;
using LDM.Sys.ServiceAPI.Model.DBModel;
using LDM.Sys.ServiceAPI.Model.Enum;
using LDM.Sys.ServiceAPI.Model.ViewModel.Response.Authority;
using Microsoft.Extensions.DependencyInjection;
using Utility.Domains.Repositories;

namespace LDM.Sys.Repository.Interfaces
{
    /// <summary>
    /// 用户用户权限资源关联仓储接口
    /// </summary>
    public interface ISysRoleAuthorityRelRepository : IBaseRepository<SysRoleAuthorityRel>, IScoped
    {

        /// <summary>
        /// 获取角色权限资源项
        /// </summary>
        /// <param name="roleIds"></param>
        /// <returns></returns>
        public List<SysRoleAuthorityRel> GetAuthorityByRoleIds(IEnumerable<int> roleIds);

        /// <summary>
        /// 获取指定类型权限资源项的
        /// </summary>
        /// <param name="roleIds"></param>
        /// <returns></returns>
        public List<SysRoleAuthorityRel> GetAuthorityByAuthorityIds(IEnumerable<int> authorityIds, AuthorityTypeEnum authorityType);

        /// <summary>
        /// 根据角色获取用户ID获取菜单
        /// </summary>
        public IEnumerable<AuthorityMenuRes> GetuthorityMenuByRoleIds(IEnumerable<int> roleIds);
    }
}
